<%@page import="com.honeycomb.utils.SystemValidate"%>
<%@page import="com.honeycomb.utils.SystemConstants"%>
<%@page import="com.honeycomb.user.dto.UserinfoDto"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<script type="text/javascript">
	location.href = "http://cai.qububu.com";
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录页</title>
<!-- <link rel="shortcut icon" href="/favicon.ico" /> -->
<link rel="icon" href="/resource/images/pages/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="/resource/images/pages/favicon.ico" type="image/x-icon">

<script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/jquery/jquery-1.8.2.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/msgConstants.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/honeycombtool.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/regist_login.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/jquery/jquery-1.8.2.js"></script> 

<style>
.error{
	
	border:1px solid red;
}
.norml{
	border:1px solid green;
}
</style>

<!-- script src="http://api.go2map.com/engine/api/ipcity/json"></script -->
<script type="text/javascript">

function do_jsonp() {
    $.getJSON("http://api.go2map.com/engine/api/ipcity/json?contenttype=utf-8&cb=?",
    function(data) {
		if(data.status=="ok") {
			$('#ipcity').val(data.response.city);
		}
    });
}

do_jsonp();

$(document).ready(function(){
	ErrReport();
	SessionIsNoNull();
});
function ErrReport(){
	var loca_url = document.location.href;
	if(loca_url == ValidMsgConstants.LOGIN_HREF){
		$('#userLoginEmailError').html('');
		}
}
function SessionIsNoNull(){
//	if($("#loginUserValue").val() != "IsNoValue"){
//		window.history.back(-1);
//	}
}
function Ipcity(){
	var city = $("#ipcity").val();
	var url = "ipcity="+city;
	url=encodeURI(encodeURI(url)); 
	window.location.href="<%=request.getContextPath() %>/user/registInfo?"+url;
	
}
</script>
</head>
<%
UserinfoDto userInfoDto2 = (UserinfoDto)session.getAttribute(SystemConstants.LOGINUSER_SESSION_NAME);
	String loginUserValue= "IsNoValue";	
	if(userInfoDto2 != null){
		loginUserValue = userInfoDto2.getUserNickname();
	}
String  str = null;
		str = (String)request.getAttribute("message");
%>
<%@ include file="top.jsp" %>
<body style="background: url('<%=request.getContextPath() %>/resource/images/pages/top-foot/bg.jpg') repeat-x;"  >
	<input type="hidden" value="<%=loginUserValue%>" id="loginUserValue">
	<div style="width: 973px;height: 500px;margin: 0 auto;margin-top: 37px;">
		<div style="float: left;width: 904px;height: 520px;background: url('<%=request.getContextPath() %>/resource/images/pages/login.jpg');margin-top:35px;">
		<div style="width: 235px;height: 500px;float: left;margin-left:500px;">
		<form action="<%=request.getContextPath() %>/user/infoCenter" method="post" onsubmit="return checkLoginInfo()">
			<div style="width: 235px;height: 192px;margin-top:35px;">	
						<div style="font-weight:bold;width: 300px;height: 8px;font-size:12px;padding-left:5px;">
						<font size="3">登录邮箱：</font><input id="userLoginEmail" maxlength="30" style="height:30px;width:200px;line-height: 30px;" name="userLoginEmail" onblur="checkUserLoginEmail()"   type="text"  >
						</div>
						<div style="width: 280px;height: 20px;"></div>
						<div style="font-weight:bold;width: 300px;height: 18px;margin-top:15px;font-size:12px;padding-left:5px;font-size:12px;">
						<font size="3">登录密码：</font><input id="userLoginPassword" maxlength="20" style="height:30px;width:200px;line-height: 30px;" name="userLoginPassword" onblur="checkUserLoginPassword()" type="password">
						</div>
						<div style="width: 280px;height: 15px;"></div>
						<div id="userLoginEmailError" style="margin-left:90px;width: 230px;height: 15px;color: red;font-size: 12px;margin-top:5px;">	
						<% if(str != null)
						{
							out.print(str);
						}else{}
						%>
						</div>
						<input type="hidden" id="ipcity" name="ipcity" value=""/>
					<div style="width: 200px;height: 52px;line-height: 32px;margin-left:72px;padding-left:5px;">
						<div style="margin-left:10px;"><input type="submit" value="登录" style="height: 30px;width:100px;margin:0px 0px 10px 5px;line-height: 20px;font-weight: bold;background-color:#00AAAA;cursor: pointer;color: white;border: 1px solid #00BBFF; border-radius:2px;" onclick="checkLoginInfo();">
						<font style="font-size:12px;"><a href="javascript:void(0)" onclick="Ipcity();">立即注册</a></font>
						
						</div>
					</div>
				
				</div>
			<div style="clear:both"></div>
		</form>
	</div>
		</div>
		
	</div>
<%@ include file="foot.jsp" %>
</body>
</html>